//组织架构的接口请求
import request from '@/utils/request'

// 查询列表
export const getDepartmentListApi = params=>{
	return request({
		url:'/company/department',
		method:'get',
		params
	})
}

// 查询单个
export const getDepartmentInfoApi = id=>{
	return request({
		url:'/company/department/' + id,
		method:'get',
	})
}

// 增加
export const addDepartmentApi = (data)=>{
	return request({
		url:'/company/department',
		method:'post',
		data
	})
}

// 删除
export const delDepartmentApi = (id)=>{
	return request({
		url:'/company/department/' + id,
		method: 'delete',
	})
}

// 修改
export const editDepartmentApi = (data)=>{
	return request({
		url:'/company/department/' + data.id,
		method:'put',
		data
	})
}